741ea9e7e9c4bdf3639a11d307208eae0aa0b2dc,cdap-app-templates/cdap-etl/cdap-etl-batch/src/main/java/co/cask/cdap/etl/batch/mapreduce/ETLMapReduce.java,ETLMapReduce,beforeSubmit,#MapReduceContext#,159

Before Change


                      GSON.toJson(sourceContext.getRuntimeArguments(), RUNTIME_ARGS_TYPE));

    String transformInfosStr = properties.get(Constants.Transform.PLUGINIDS);
    Preconditions.checkNotNull(transformInfosStr, "Transform plugin ids not found in program properties.");

    List<TransformInfo> transformInfos = GSON.fromJson(transformInfosStr, TRANSFORMINFO_LIST_TYPE);

After Change


    Map<String, String> properties = context.getSpecification().getProperties();
    Pipeline pipeline = GSON.fromJson(properties.get(Constants.PIPELINEID), Pipeline.class);
    // following should never happen
    Preconditions.checkNotNull(pipeline, "Pipeline is null");
    Preconditions.checkNotNull(pipeline.getSinks(), "Sinks could not be found in program properties");
    // empty transform list is created during pipeline register
    Preconditions.checkNotNull(pipeline.getTransforms());